package com.nostop.param;


import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ToString
public class RoleParam {

    private Integer id;

    @NotBlank(message = "角色名称不可以为空")
    @Length(min = 2,max = 20,message = "角色名称长度需要在2-20个字之间")
    private String name;

    @NotNull(message = "必须指定权限点的类型")
    @Min(value = 1,message = "角色点类型不合法")
    @Max(value = 2,message = "角色点类型不合法")
    private Integer type = 1;

    @NotNull(message = "必须指定权限点的状态")
    @Min(value = 0,message = "权限点状态不合法")
    @Max(value = 1,message = "权限点状态不合法")
    private Integer status;

    @Length(max = 200,message = "备注的长度需要在150内")
    private String remark;

}
